from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^microblog/', include('microblog.foo.urls')),

    
    (r'^message/$', 'microblog.microblogapp.views.show_message'),
    (r'^browse/$', 'microblog.microblogapp.views.browse'),
    (r'^(id)/(\d+)/$', 'microblog.microblogapp.views.show_userspace'),
    (r'^(nick)/([a-zA-Z0-9u4e00-u9fa5]+)/$', 'microblog.microblogapp.views.show_userspace'),

    (r'^base/$', 'microblog.microblogapp.views.base_style_test'),
    (r'^login/$', 'microblog.microblogapp.views.login'),
    (r'^logout/$', 'microblog.microblogapp.views.logout'),
    (r'^register/$', 'microblog.microblogapp.views.register'),
    (r'^home/$', 'microblog.microblogapp.views.show_home'),
    (r'^home/(forward)/(\d+)/$', 'microblog.microblogapp.views.show_home'),
    (r'^home/(reply)/(\d+)/$', 'microblog.microblogapp.views.show_home'),
    (r'^delete/$', 'microblog.microblogapp.views.delete_post'),
    (r'^follow/(id)/(\d+)/$', 'microblog.microblogapp.views.follow_person'),
    (r'^follow/(nick)/([a-zA-Z0-9u4e00-u9fa5]+)/$', 'microblog.microblogapp.views.follow_person'),
    (r'^remove/(id)/(\d+)/$', 'microblog.microblogapp.views.remove_follow'),
    (r'^remove/(nick)/([a-zA-Z0-9u4e00-u9fa5]+)/$', 'microblog.microblogapp.views.remove_follow'),

    # Uncomment the admin/doc line below to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),


    (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c:/microblog/css'}),
    (r'^js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c:/microblog/js'}),
    (r'^image/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c:/microblog/image'}), 
)
